﻿@model MvcCmsProjectTracker.ViewModels.AccountProfileViewModel
<h2>
    Profile</h2>
@using (Html.BeginForm())
{
    <div>
        <div class="editor-label">
            First Name
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(m => m.Profile.FirstName)
        </div>
        <div class="editor-label">
            Last Name
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(m => m.Profile.LastName)
        </div>
        @if (Roles.IsUserInRole("Admin") || Roles.IsUserInRole("HelpDeskAdmin"))
        {
        <div class="editor-label">
            Default Project
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(m => m.Profile.DefaultProjectID, new SelectList(Model.UsersProjects, "ProjectID", "Name", Model.Profile.DefaultProjectID), new { style = "width:200px" })
        </div>
        }
        <p>
            <input type="submit" value="Save" />            
        </p>
    </div>
}
@Html.Partial("ControlsProjectTracker/Message", Model)
<div>
    <a href="/projecttracker/ticket/myhelpdesk">Help Desk</a>
        @if (Roles.IsUserInRole("Admin") || Roles.IsUserInRole("HelpDeskAdmin"))
        {
        <br />
        <a href="/projecttracker/project">Project Tracker</a>
        }
</div>